home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / net / spakparnet_0_5.lha / han / actions.c < prev    next >
C/C++ Source or Header  |  1992-11-09  |  2KB  |  83 lines

  1. /********************************************************************
  2.  ** NETWORK FILESYSTEM - DOS HANDLER
  3.  **
  4.  ** (c) Spak, Darrell Tam, c9107253@ee.newcastle.edu.au (1994)
  5.  ** phone (Australia) 049-829-710
  6.  **                    49-829-710
  7.  ** (c) SST 1994
  8.  **
  9.  ** ACTIONS
  10.  **
  11.  ** Actions are sent to the network device
  12.  **
  13.  ** BUGS: This filesystem does not directly support NewShell (& run) since
  14.  ** they insist on opening a file called "*" for output, which, in some cases
  15.  ** would be very difficult to track.
  16.  **
  17.  ** TABS to 4
  18.  ********************************************************************/
  19.  
  20. /* res1 of the packet defaults to -1 (before these are called in venus.c)
  21.    and res2 defaults to 0 */
  22.  
  23. #include "/snd/everything.h"
  24. #include "deadheads.h"
  25. #include "root_protos.h"
  26. #include "globs_protos.h"
  27. #include "xtra_protos.h"
  28.  
  29. /********************************************************************/
  30.    long action_die(struct DosPacket *dosmsg)
  31. /********************************************************************/
  32. {
  33.     notdone = 0;
  34.     return(AR_FLAG_RETURNDOSMSG);
  35. }
  36.  
  37.  
  38.  
  39.  
  40.  
  41. /********************************************************************/
  42. long action_disk_info(struct DosPacket *dosmsg)
  43. /********************************************************************/
  44. {
  45. struct InfoData *id = BTOC(dosmsg->dp_Arg1);
  46.     dbzero(id, sizeof(struct InfoData));
  47.     id->id_DiskState     = ID_VALIDATED;
  48.     id->id_NumBlocks     = 1000;
  49.     id->id_NumBlocksUsed = 10;
  50.     id->id_BytesPerBlock = 512;
  51.     id->id_DiskType = ID_DOS_DISK;
  52.     id->id_VolumeNode = (long)CTOB(DevList);
  53.     id->id_InUse = 55;
  54.     return(AR_FLAG_RETURNDOSMSG);
  55. }
  56.  
  57.  
  58.  
  59. /********************************************************************/
  60.    long action_info(struct DosPacket *dosmsg)
  61. /********************************************************************/
  62. { /* lock, infodata : bool */
  63. struct InfoData *id = BTOC(dosmsg->dp_Arg2);
  64.     dbzero(id, sizeof(struct InfoData));
  65.     id->id_DiskState     = ID_VALIDATED;
  66.     id->id_NumBlocks     = 1000;
  67.     id->id_NumBlocksUsed = 10;
  68.     id->id_BytesPerBlock = 512;
  69.     id->id_DiskType = ID_DOS_DISK;
  70.     id->id_VolumeNode = (long)CTOB(DevList);
  71.     id->id_InUse = 55;
  72.     return(AR_FLAG_RETURNDOSMSG);
  73. }
  74.  
  75.  
  76. /* in the "handle_end_net" routine, there should be a little counter kept which
  77.    contains the number of tries to send a packet - if this exceeds a certain
  78.    number then the local memory for the file arg should be freed anyhow and
  79.    the remote machine ignored */
  80.  
  81.  
  82.  
  83.